From: Felix Fietkau Date: Sun, 19 Nov 2023 15:11:40 +0000 (+0100) Subject: lib: unmap full ring buffer X-Git-Url: http://git.openwrt.org/%22https:/collectd.org//%22/%22https:/collectd.org/%22?a=commitdiff_plain;h=44351435e28c6c878bf0a9054cb002704312d60e;p=project%2Fudebug.git lib: unmap full ring buffer Signed-off-by: Felix Fietkau --- diff --git a/lib.c b/lib.c index c545816..ec8c23d 100644 --- a/lib.c +++ b/lib.c @@ -525,7 +525,7 @@ void udebug_buf_free(struct udebug_buf *buf) if (ctx && ctx->fd.fd >= 0) udebug_buf_msg(buf, CL_MSG_RING_REMOVE); - munmap(buf->hdr, buf->head_size + buf->data_size); + munmap(buf->hdr, buf->head_size + 2 * buf->data_size); close(buf->fd); memset(buf, 0, sizeof(*buf)); }